package com.suray.rgv60.util;

/**
 * 发送、修改地图进度
 */
public enum Rgv60BasePro {
    INVALID(-1, "无效"),
    INIT(1, "初始化"),
    PROCESSING(2, "进行中"),
    SUCCESS(3, "成功"),
    FAIL(4, "失败"),
    ;

    Integer value;
    String des;

    Rgv60BasePro(Integer value, String des) {
        this.value = value;
        this.des = des;
    }

    public Integer getValue() {
        return value;
    }

    public static Rgv60BasePro parseValue(int value) {
        for (Rgv60BasePro rgv60BasePro : Rgv60BasePro.values()) {
            if (rgv60BasePro.value == value) {
                return rgv60BasePro;
            }
        }

        return INVALID;
    }

    @Override
    public String toString() {
        return des;
    }
}
